<?php
function connect() {
  
  $host = 'localhost';
  $database = 'donate';
  $username = 'donate';
  $password = 'donate';

  $db_server = mysql_connect($host, $username, $password);
  if (!$db_server) {
    die("Cannot connect to server $host with username $username 
          and password $password.<br />" . mysql_error( ));
  }
  $db_selected = mysql_select_db($database, $db_server);
  if (!$db_selected) {
    die("Cannot select database $database." . mysql_error( ));
  };
  
  return true;
}
?>